<header class="header">
    <!-- Start Header Top topbar -->
    <div class="header-top dark-bg">
        <div class="container">
            <div class="row align-items-center">
                <div class="col-md-5">
                    <!-- start Header Top Info  -->
                    <ul class="header-top-info nav pt-sans justify-content-center justify-content-md-start">
                        <li>欢迎光临{$lang.sitename}！</li>
                    </ul>
                    <!-- End Header Top Info  -->
                </div>
                <div class="col-md-7">
                    <!-- Start Header Top toolbar-->
                    <div class="header-top-settings-wrap">
                        <ul class="header-top-settings pt-sans nav justify-content-center justify-content-md-end">
                            {if $this->member}
                            <li class="dropdown dropdown-extended dropdown-notification " id="header_notification_bar">
                                <a href="javascript:;" data-toggle="dropdown" data-hover="dropdown"
                                    data-close-others="true">
                                    <i class="icon-bell"></i>
                                    <span class="badge badge-danger" style="font-weight: normal;">
                                        {php echo $this->member['noticenum'];}
                                    </span>
                                    <i class="fa fa-angle-down"></i>
                                </a>
                                <ul class="dropdown-menu">
                                    <li class="external">
                                        <h3>您有 <strong> {php echo $this->member['noticenum'];} </strong> 条新的消息</h3>
                                        <a href="{php echo url('/notice');}"> 查看全部 </a>
                                    </li>
                                    <ul class="dropdown-menu-list scroller" style="height: 250px;"
                                        data-handle-color="#637283">
                                        <php>$touserid=$this->member["id"];
                                            $notice=$this->notice;
                                        </php>
                                        {loop name="notice"}
                                        <li>
                                            <a href="{php echo url('member/notice/show',array('id'=>$v['id']));}">
                                                <span class="time float-right">{php echo udate($v['addtime']);}</span>
                                                <span class="details">
                                                    <span class="label label-sm label-icon label-info">
                                                        <i class="fa fa-bullhorn"></i>
                                                    </span>{$v.title}</span>
                                                <div class="clearfix"></div>
                                            </a>
                                        </li>
                                        {/loop}
                                    </ul>
                                </ul>
                            </li>
                            <li class="topcart">
                                <a href="{php echo url('/cart');}">
                                    <i class="icon-basket"></i> <span class="text-white">{php
                                        if($this->member['cartnum']) echo $this->member['cartnum'];}</span>
                                </a>
                            </li>
                            <li class="dropdown dropdown-user">
                                <a href="javascript:;" data-toggle="dropdown" data-hover="dropdown"
                                    data-close-others="true" aria-expanded="true">
                                    <i class="icon-user"></i> {php echo $this->member['username'];} <i
                                        class="fa fa-angle-down"></i>
                                </a>
                                <ul class="dropdown-menu dropdown-menu-default">
                                    <li>
                                        <a href="{php echo url('/member');}">
                                            <i class="icon-user"></i> 会员中心 </a>
                                    </li>
                                    <li>
                                        <a href="{php echo url('/myinfo');}">
                                            <i class="icon-user"></i> 我的基本资料 </a>
                                    </li>
                                    <li>
                                        <a href="{php echo url('/cart');}">
                                            <i class="icon-basket"></i> 我的购物车
                                            <span class="badge badge-danger"> {php echo $this->member['cartnum'];}
                                            </span>
                                        </a>
                                    </li>
                                    <li>
                                        <a href="{php echo url('/notice');}">
                                            <i class="icon-volume-1"></i> 我的消息
                                            <span class="badge badge-danger"> {php echo $this->member['noticenum'];}
                                            </span>
                                        </a>
                                    </li>
                                    <li>
                                        <a href="<?php echo url('/orders');?>">
                                            <i class="fa fa-list"></i> 我的订单
                                            <span class="badge badge-success"> {php echo $this->member['ordernum'];}
                                            </span>
                                        </a>
                                    </li>
                                    <li class="divider"> </li>
                                    <li>
                                        <a href="{php echo url('/pwd');}">
                                            <i class="icon-lock"></i> 修改密码 </a>
                                    </li>
                                    <li>
                                        <a href="{php echo url('/logout');}">
                                            <i class="icon-key"></i> 退出 </a>
                                    </li>
                                </ul>
                            </li>
                            {else}
                            {if $cfg['allow_reg']}
                            <li><a href="{php echo url('/login');}"> <i class="icon-user"></i> 登 录</a></li>
                            <li><a href="{php echo url('/register');}"> <i class="icon-user-follow "></i> 注 册</a></li>
                            {/if}
                            {/if}
                            {yy:lang}
                            {loop}
                            {if $v['id']!=$lang['id']}
                            <li><a href="{$v.url}"> <i class="icon-globe"></i> {$v.title} </a></li>
                            {/if}
                            {/loop}
                            {/yy}
                            <!--    <li><a  href="javascript:"  onclick="SetHome(this,window.location)" >设为首页</a></li>
                                <li ><a href="javascript:" onclick="javascript:addFavorite2()">加为收藏</a></li>-->
                            <li class="bg-red" style="color:#fff; font-size: 18px;">
                                <div
                                    style="font-size: 15px; background: #fff; color:#2981ff; width: 22px; height: 22px; border-radius: 11px;">
                                    <i class="fa fa-phone"
                                        style="color:#2981ff; margin-left: 5px; margin-top: 4px;"></i>
                                </div>
                                &nbsp;{$cfg.tel}
                            </li>
                        </ul>
                    </div>
                    <!-- Start Header Top toolbar-->
                </div>
            </div>
        </div>
    </div>
    <!-- End Header Top topbar -->
    <!-- Start Header Navbar-->
    <div class="main-header light-bg">
        <div class="container">
            <div class="row align-items-center">
                <div class="col-xl-4 col-lg-4 col-md-5 col-sm-10 col-10">
                    <div class="row">
                        <!-- Logo -->
                        <div class="logo">
                            <a href="/">
                                <img src="{$lang.logo}" data-rjs="2" alt="{$lang.sitename}">
                            </a>
                        </div>
                        <!-- End of Logo -->
                    </div>
                </div>
                <div class="col-xl-8 col-lg-8 col-md-7 col-sm-2 col-2">
                    <div class="menu--inner-area clear-fix">
                        <div class="menu-wraper">
                            <nav>
                                <!-- Header-menu -->
                                <div class="header-menu pt-sans">
                                    <ul>
                                        <li {if ROUTE_A=='index' } class="active" {/if}><a href="{ROOT}">首页</a></li>
                                        {yy:cat level=3}
                                        {loop}
                                        <li {if !empty($rootcatid)&&$rootcatid==$v['id'] } class="active" {/if}><a
                                                href="{$v.url}"> {$v.title} <span class="arrow"></span> </a>
                                            <ul class="dropdown-menu pull-left">
                                                {loop name="v['child']" index="k2" }
                                                <li><a href="{$v.url}">{$v.title}</a>
                                                    <ul class="dropdown-menu pull-left">
                                                        {loop name="v['child']" index="k3" }
                                                        <li><a href="{$v.url}">{$v.title}</a></li>
                                                        {/loop}
                                                    </ul>
                                                </li>
                                                {/loop}
                                            </ul>
                                        </li>
                                        {/loop}
                                        {/yy}
                                    </ul>
                                </div>
                                <!-- End of Header-menu -->
                            </nav>


                        </div>
                    </div>
                </div>

            </div>
        </div>
    </div>
    <!-- End Header Navbar-->
</header>